home *** CD-ROM | disk | FTP | other *** search
/ IBM OEM Software Product … CD For PC Manufacturers / IBM OEM Software - Product Sampler CD for PC Manufacturers.iso / InternetIntranets / Notes / INSTALL.DSK / SHARE32.LSS < prev    next >
Text File  |  1995-11-15  |  68KB  |  1,784 lines

  1. ''   Module Name:    share32.lss
  2. ''
  3. ''   Module Code:    TOOLKIT
  4. ''
  5. ''   Author:         MZ              
  6. ''
  7. ''   Creation Date:  Apr 12, 1995
  8. ''
  9. ''   Copyright Lotus Development Corporation, (c) 1991
  10. ''
  11. ''
  12. ''  
  13. ''   Description: 
  14. ''     Lotus script file for common install
  15. ''  
  16. ''
  17. ''   Additional authors:
  18. ''
  19. ''   Change History:
  20. ''   $Log:   //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/share32@.lss  $
  21. '' 
  22. ''    Rev 1.69.1.1   15 Nov 1995 17:23:08   mhishinu
  23. '' Merged GC5 into FE5
  24. '' 
  25. ''    Rev 1.69.1.0   Oct 19 1995 15:12:42   cmoy
  26. '' merged fe3 to fe5
  27. '' 
  28. ''    Rev 1.69   13 Oct 1995 14:42:24   jdonohue
  29. '' Added function Lot_RefreshLocalComponentDir that performs this resetting
  30. '' source directory for sections using symbols COMPONENTSDIR and LOTUSUSERDIR fo
  31. '' node installs
  32. '' 
  33. ''    Rev 1.68   10 Oct 1995 15:27:32   jdonohue
  34. '' Deleted registration of shared components for single product (SPR KHAN2WQMU4)
  35. '' 
  36. ''    Rev 1.67   03 Oct 1995 15:06:50   jdonohue
  37. '' For node, register the help registry entry under the first product
  38. '' 
  39. ''    Rev 1.66   02 Oct 1995 17:22:36   tveerapp
  40. '' Fixed spr for Spell Data path to include spell subdirectory.
  41. '' 
  42. ''    Rev 1.65   29 Sep 1995 14:53:44   tveerapp
  43. '' Fixed Spr#TBAT2WFLYM. If lotus Script or Chart is Installed, SystemServices
  44. '' key is written.
  45. '' 
  46. ''    Rev 1.64   29 Sep 1995 12:05:50   jdonohue
  47. '' Do not write shared component information in cinst???.ini if name or version
  48. '' blank
  49. '' 
  50. ''    Rev 1.63   29 Sep 1995 10:09:28   jdonohue
  51. '' Replace cinstall.ini corrupt message with "Drive not available" message if
  52. '' drive not mapped or UNC path invalid
  53. '' 
  54. ''    Rev 1.62   28 Sep 1995 13:35:32   jdonohue
  55. '' Don't use registry entry for validating existing network path for node
  56. '' 
  57. ''    Rev 1.61   25 Sep 1995 17:21:46   tveerapp
  58. '' Uncommented the changes I had commented out for testing.
  59. '' 
  60. ''    Rev 1.60   25 Sep 1995 15:23:00   tveerapp
  61. '' Fixed Spr# TBAT2VZL3X.  Spell registry entries. Also added code to write
  62. '' to HCU userpath in Lot_WriteLocalNetwork.
  63. '' 
  64. ''    Rev 1.59   25 Sep 1995 10:21:50   tveerapp
  65. '' Fixed spr#DCRP2W7PD7. Lot_WriteLocalNetCompPath was incorrectly writing
  66. '' out NetCompPath for standalone(which is not needed) and registering it for
  67. '' uninstall.
  68. '' 
  69. ''    Rev 1.58   Sep 25 1995 09:53:30   cmoy
  70. '' Added function Lot_RegisterHelpFile to add help files to registry and create
  71. '' entry in cinstall.ini for uninstall. Set value of symbol LOTUSUSERDIR to 
  72. '' point to components directory. Do not write dependencies to registry for NODE
  73. '' install
  74. '' 
  75. ''    Rev 1.57   22 Sep 1995 14:53:26   tveerapp
  76. '' Fixed the typ in SytemServices key.Spr#DCRP2WBJSE
  77. '' 
  78. ''    Rev 1.56   21 Sep 1995 18:12:26   tveerapp
  79. '' Fixed spr# TLAN2W7JNX. Registry entries for  Mobil Player.
  80. '' 
  81. ''    Rev 1.55   19 Sep 1995 17:39:20   tveerapp
  82. '' Added special registry processing for Chart in Lot_WriteShare32Registry().
  83. '' 
  84. ''    Rev 1.54   15 Sep 1995 16:55:02   amontalv
  85. '' Check for UNC path before changing drive.
  86. '' 
  87. ''    Rev 1.53   13 Sep 1995 17:46:06   jdonohue
  88. '' Use top section of first product to register directories for uninstall
  89. '' 
  90. ''    Rev 1.52   13 Sep 1995 16:05:24   jdonohue
  91. '' IsDriveMapped returns true only for fixed or remote drive that exists
  92. '' 
  93. ''    Rev 1.51   12 Sep 1995 11:00:24   tveerapp
  94. '' Changes in Lot_Write32Registry for writing to cinstnod.ini for a node install
  95. '' 
  96. ''    Rev 1.50   12 Sep 1995 10:34:52   jdonohue
  97. '' Create local and network component path if they don't exist, and register 
  98. '' them as objects for uninstall
  99. '' 
  100. ''    Rev 1.49   11 Sep 1995 15:58:50   jdonohue
  101. '' IsDriveMapped checks for UNC volumes that directory exists
  102. '' 
  103. ''    Rev 1.48   09 Sep 1995 16:43:24   tveerapp
  104. '' Fixed the suite node problem. Set the SYM_NETCOMPONENT symbol if a clean 
  105. '' path is found with the currently mapped drive.
  106. '' 
  107. ''    Rev 1.47   06 Sep 1995 09:22:30   tveerapp
  108. '' Fixed the suite node install problem.
  109. '' 
  110. ''    Rev 1.46   01 Sep 1995 15:14:00   jdonohue
  111. '' Resourced string for drive not mapped error
  112. '' 
  113. ''    Rev 1.45   01 Sep 1995 12:18:34   jdonohue
  114. '' Don't register HLM\lotus\prod\ver\Components\comp\ver for suite
  115. '' 
  116. ''    Rev 1.44   31 Aug 1995 11:44:34   jdonohue
  117. '' Added function IsDriveMapped to determine if drive letter is mapped and 
  118. '' available
  119. '' Only exit for non-available NetWorkPath if NODE install
  120. '' 
  121. ''    Rev 1.43   29 Aug 1995 10:52:18   jdonohue
  122. '' Check all drives for validating SYM_COMPONENTSDIR$
  123. '' 
  124. ''    Rev 1.42   28 Aug 1995 16:14:54   jdonohue
  125. '' Change help file procesing logic
  126. '' Popup message if shared component drive not mapped and exit
  127. '' 
  128. ''    Rev 1.42   28 Aug 1995 13:31:08   jdonohue
  129. '' Change help file procesing logic
  130. '' Popup message if shared component drive not mapped and exit
  131. '' 
  132. ''    Rev 1.40   25 Aug 1995 17:04:48   jdonohue
  133. '' Added support for node help file registration
  134. '' 
  135. ''    Rev 1.39   25 Aug 1995 16:04:04   jdonohue
  136. '' Take out print for failure to find destination path -- could happen for node
  137. '' 
  138. ''    Rev 1.38   24 Aug 1995 15:58:14   jdonohue
  139. '' Added help file registration to shared component processing
  140. '' 
  141. ''    Rev 1.35   23 Aug 1995 08:15:58   jdonohue
  142. '' Added helpfilename to shared database, read filename for language from 
  143. '' shared.ini
  144. '' 
  145. ''    Rev 1.34   21 Aug 1995 15:41:06   amontalv
  146. '' Put name of registry keys into globals.lss
  147. '' 
  148. ''    Rev 1.33   21 Aug 1995 15:15:54   jdonohue
  149. '' Consolidated share section building for different types
  150. '' 
  151. ''    Rev 1.32   16 Aug 1995 20:33:34   amontalv
  152. '' Added code to do error messages for registry.
  153. '' 
  154. ''    Rev 1.31   14 Aug 1995 15:08:36   tveerapp
  155. '' Removed the win.ini entry for teammail because the vim-over mapi has gone
  156. '' away.
  157. '' 
  158. ''    Rev 1.30   11 Aug 1995 09:31:54   jdonohue
  159. '' Don't write DLL name for component
  160. '' 
  161. ''    Rev 1.29   01 Aug 1995 14:54:20   jdonohue
  162. '' Removed extraneous set of quotes on version string
  163. '' 
  164. ''    Rev 1.28   24 Jul 1995 09:24:58   jdonohue
  165. '' Increment length for traling null in call to Lot_CreateRegKeyValueEx
  166. '' 
  167. ''    Rev 1.27   18 Jul 1995 11:08:00   jdonohue
  168. '' Make the shared component entry for the product/version
  169. '' 
  170. ''    Rev 1.26   17 Jul 1995 17:28:02   tveerapp
  171. '' Added code to Lot_WriteShare32registry to write into the win.ini for 
  172. '' TeamMail.
  173. '' 
  174. ''    Rev 1.25   17 Jul 1995 16:50:14   amontalv
  175. '' Changed code for registering dialog editor.
  176. '' 
  177. ''    Rev 1.24   17 Jul 1995 16:41:14   amontalv
  178. '' Added registration for dlg editor
  179. '' 
  180. ''    Rev 1.23   17 Jul 1995 15:36:24   amontalv
  181. '' Added Lot_AddLinkToFolder to add Dialog Editor in correct location.
  182. '' 
  183. ''    Rev 1.22   20 Jun 1995 17:42:50   mzgripce
  184. '' use trimendslash before calling the createregkeyval
  185. '' 
  186. ''    Rev 1.21   19 Jun 1995 19:10:40   mzgripce
  187. '' do the share32 operations only if share32 are supported 
  188. '' 
  189. ''    Rev 1.20   16 Jun 1995 15:34:50   cmoy
  190. '' mariana fixed registration for flw build
  191. '' 
  192. ''    Rev 1.19   15 Jun 1995 18:08:54   mzgripce
  193. '' attempt to fix local/network Path in Win95 registry
  194. '' 
  195. ''    Rev 1.18   12 Jun 1995 18:14:46   mzgripce
  196. '' populate the inifilename
  197. '' 
  198. ''    Rev 1.17   12 Jun 1995 18:05:26   mzgripce
  199. '' added fileininame and fix Dependents writing when tere are no dependents
  200. '' 
  201. ''    Rev 1.16   08 Jun 1995 17:04:00   mzgripce
  202. '' write WIN32 Shared Component Information in cinstall.ini for uninstall
  203. '' 
  204. ''    Rev 1.15   07 Jun 1995 18:56:16   mzgripce
  205. '' register the dependents for the components 
  206. '' 
  207. ''    Rev 1.14   07 Jun 1995 17:38:10   tveerapp
  208. '' For suite server install get the componentsdir value from response file
  209. '' for automation. The change is in InitShare32.
  210. '' 
  211. ''    Rev 1.13   07 Jun 1995 16:33:32   mzgripce
  212. '' fix the registry after the new script integration 
  213. '' 
  214. ''    Rev 1.12   06 Jun 1995 17:30:12   tveerapp
  215. '' ADDED check for single product server install in InitShare32.
  216. '' 
  217. ''    Rev 1.11   06 Jun 1995 16:44:44   tveerapp
  218. '' Added Code to InitShare32 to read in the COMPONENTSDIR from the
  219. '' response file for a single products server install (automated).
  220. '' 
  221. ''    Rev 1.10   06 Jun 1995 15:59:12   amontalv
  222. '' We are experiencing problems with LotusScript when we fill buffers with
  223. '' nulls and then pass them to C routines.  For the time being, it is suggested
  224. '' that we fill our buffers with spaces.  To this end (and to make it
  225. '' easier to change back later) I have created a small LotusScript routine
  226. '' named CreateBuffer.  You use it any time you ordinarily would use
  227. '' STRING$(num, 0).  CreateBuffer() just needs the num, it decides what to
  228. '' fill the buffer with (sorry about the grammer).  Right now it fill the
  229. '' buffer with spaces.  Later we will change it back to nulls.  Also look
  230. '' at the routine NullTrim().  It will get rid of final nulls and spaces.
  231. '' You can use this when getting a buffer that has been changed or filled
  232. '' in a external C routine.
  233. '' 
  234. ''    Rev 1.9   05 Jun 1995 18:03:08   tveerapp
  235. '' Modified InitShare32. Removed the check foe automated install.
  236. '' Initshare32 does the same processing for all kinds of
  237. '' install.
  238. '' 
  239. ''    Rev 1.8   04 Jun 1995 16:32:14   mzgripce
  240. '' debig populate and write to the registry 
  241. '' 
  242. ''    Rev 1.7   01 Jun 1995 15:40:50   mzgripce
  243. '' enable the registry calls and populate the datadriver struc
  244. '' 
  245. ''    Rev 1.6   22 May 1995 19:16:02   mzgripce
  246. '' read from the registry if the components directory already exists 
  247. '' 
  248. ''    Rev 1.5   21 May 1995 17:25:52   mzgripce
  249. '' set the component default value differently 
  250. '' 
  251. ''    Rev 1.4   16 May 1995 17:09:00   glutz
  252. '' Changed USE to AUTOMATE
  253. '' 
  254. ''    Rev 1.3   13 May 1995 16:59:44   mzgripce
  255. '' added Lot_Save32ShareConfig... function and Populate32SharedData subroutine
  256. '' 
  257. ''    Rev 1.2   03 May 1995 18:16:14   mzgripce
  258. '' move some functions from share.lss and debug the syntax errors 
  259. '' 
  260. ''    Rev 1.1   17 Apr 1995 16:47:38   mzgripce
  261. '' add more functionality
  262. '' 
  263. ''    Rev 1.0   13 Apr 1995 11:23:46   mzgripce
  264. '' Initial Revision
  265. '' 
  266. ''    Rev 1.0   13 Apr 1995 11:00:02   mzgripce
  267. '' Initial Revision
  268. '' 
  269. '' 
  270. ''----------------------------------------------------------------------
  271. USE "AUTOMATE"
  272. OPTION DECLARE
  273.  
  274. 'Global variables
  275. PUBLIC gLotusIniPath AS STRING
  276. PUBLIC gLotusappIniPath AS STRING
  277. PUBLIC gLotusBcfDir AS STRING
  278. PUBLIC gLotusappDir AS STRING
  279. PUBLIC g32DataLensInstalled AS INTEGER
  280.  
  281. 'Global Functions
  282. DECLARE PUBLIC FUNCTION InitSHARE32 () AS INTEGER
  283. DECLARE PUBLIC FUNCTION ConfigSHARE32 () AS INTEGER
  284. DECLARE PUBLIC FUNCTION AddSHARE32Icons () AS INTEGER
  285. DECLARE PUBLIC FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
  286. DECLARE PUBLIC FUNCTION Lot_GetLotusiniPath (s$) AS INTEGER
  287. DECLARE PUBLIC FUNCTION Lot_GetSharedIniPathName() AS STRING
  288. DECLARE PUBLIC FUNCTION Lot_GetLotusappiniPath (s1$, s2$,s3$) AS INTEGER
  289. DECLARE PUBLIC FUNCTION IsDriveMapped(szPath$) AS INTEGER
  290. DECLARE PUBLIC SUB Lot_RegisterHelpFile(szKey$, szDir$, FileName$)
  291. DECLARE PUBLIC FUNCTION Lot_RefreshLocalComponentDir () AS INTEGER
  292.  
  293.  
  294. 'Local Functions
  295. DECLARE FUNCTION Lot_GetAllShared32Installed () AS INTEGER
  296. DECLARE FUNCTION Lot_WriteRegistryLocalNetworkPath() AS INTEGER
  297. DECLARE FUNCTION Lot_WriteKey(Entry$) AS INTEGER
  298. DECLARE FUNCTION Lot_Save32ShareConfigInInstallIni() AS INTEGER
  299. DECLARE SUB Populate32SHAREDDATA
  300. DECLARE SUB Lot_WriteShare32InTheRegistry
  301. DECLARE SUB PopupMappingErrorMsgExit(szPath$)
  302.  
  303. 'Data Structure
  304.  
  305. '******************** Win 32 Shared features data driver *********
  306. TYPE WIN32SHARED
  307.    SharedIniWin32SecName      AS STRING
  308.    Win32ComponentName         AS STRING
  309.    ListOfFilesInWin32Section  AS STRING    'List
  310.    DestSubdir                 AS STRING
  311.    INFSharedKey               AS STRING
  312.    ListOfINFSectionKeywords   AS STRING    'List
  313.    IniFileName                AS STRING
  314.    IniSectionName             AS STRING
  315.    IniEntryName               AS STRING
  316.    KeyFileName                AS STRING
  317.    HelpFileNames              AS STRING    'List
  318.    RegistrationKey            AS STRING    
  319.    Version                    AS STRING
  320.    ListOfDependsOnNames       AS STRING
  321.    ListOfDependsOnVers        AS STRING
  322. END TYPE
  323.  
  324. DIM Shared32Data(gMaxNumOfSharedKeywords) AS WIN32SHARED
  325. DIM Shared32DataCount AS INTEGER        'The current number of structs
  326.  
  327.  
  328. DIM SectTypeList LIST AS STRING
  329. SUB Initialize
  330.     SectTypeList(1) = "Program"
  331.     SectTypeList(2) = "User"
  332.     SectTypeList(3) = "Data"
  333.     SectTypeList(4) = "Filters"
  334. END SUB
  335.  
  336. PUBLIC FUNCTION InitSHARE32 () AS INTEGER
  337. '** Purpose:    Initialize COMPONENTSDIR$ destination
  338. '**             symbols 
  339. '**             and for automated install 
  340. '**              sets SYM_AUTO_COMPONENTSDIR$
  341. '** Author:     MZ                             
  342. '** Arguments:  None
  343. '** Returns:    SUCCESS
  344. '*************************************************************************
  345.    DIM lbLotusAppsize&, componentsDir$, possibleDrv$
  346.    DIM availSpace&, network$, cwd$, gInstallIniFile$, rc%, netComponent$
  347.    DIM netComponentIni$
  348.    DIM rv%, notused%, SameFlag$
  349.    DIM source$, FLWPath$, drive$, RCDialog$, AutoLotusapp$
  350.    DIM KeyHandle&, RegKeyReturn&,AutoComponents$,CompPathLen&
  351.    DIM ExistingLocalPath$, ExistingNetworkPath$
  352.  
  353.    CompPathLen&=CLNG(1024)
  354.    ExistingLocalPath$ = CreateBuffer(1024)
  355.    ExistingNetworkPath$ = CreateBuffer(1024)
  356.    'print "ExistingLocalPath$" ,ExistingLocalPath$
  357.    'print "CompPathLen&",CompPathLen&
  358.   
  359.    '** Execute the rest only if there is a registered product that supports 
  360.    '** share32; Prods(i%)Share32=1
  361.     InitSHARE32 = SUCCESS
  362.    IF Lot_AreShare32ToolsSupported() <> 1 THEN EXIT FUNCTION
  363.  
  364.     '** MZ: Available space returns bytes
  365.     lbLotusAppSize& = CLNG(10485760) ''10Mb
  366.  
  367.     'Get the local and network paths from the registry if they exist
  368.     '***************************************************************
  369.     'print "before calling Lot_GetRegKeyValueEx"
  370.     RegKeyReturn& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  371.         gREGLOTUSCOMP,_
  372.         "LocalPath", 0, _
  373.         ExistingLocalPath$,_
  374.         CompPathLen&)
  375.     'print "afer calling Lot_GetRegKeyValueExRegKeyReturn&,",RegKeyReturn&
  376.     ExistingLocalPath$=NullTrim(ExistingLocalPath$)
  377.     'print "ExistingLocalPath$,CompPathLen&  **"+ExistingLocalPath$+"**",CompPathLen&
  378.     IF RegKeyReturn& = ERROR_SUCCESS THEN
  379.         IF IsDriveMapped(ExistingLocalPath$) = TRUE THEN
  380.             SetSymbolValue SYM_EXISTINGLOCALPATH$, Lot_TrimEndSlash(ExistingLocalPath$)+"\"
  381.         ELSE
  382.             ExistingLocalPath$ = ""
  383.         END IF
  384.     END IF
  385.  
  386.     'print ExistingLocalPath$,"ExistingLocalPath$ share32.lss"
  387.     IF ExistingLocalPath$ <> "" THEN
  388.         SetSymbolValue SYM_LOTUSLOCALPATHEXISTS$, "1"
  389.     ELSE
  390.         SetSymbolValue SYM_LOTUSLOCALPATHEXISTS$, "0"
  391.     END IF
  392.  
  393.     network$ = GetSymbolValue(SYM_NETWORK$)
  394.  
  395.     'print "before calling Lot_GetRegKeyValueEx"
  396.     RegKeyReturn& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  397.         gREGLOTUSCOMP,_
  398.         "NetworkPath",REG_SZ, _
  399.         ExistingNetworkPath$, _
  400.         CompPathLen&)
  401.     'print "afer calling Lot_GetRegKeyValueExRegKeyReturn&,",RegKeyReturn&
  402.     IF RegKeyReturn& = ERROR_SUCCESS THEN
  403.         ExistingNetworkPath$=NullTrim(ExistingNetworkPath$)
  404.         ExistingNetworkPath$= Lot_TrimEndSlash(ExistingNetworkPath$)+"\"
  405.         'print ExistingNetworkPath$,"ExistingNetworkPath$ share32.lss"
  406.         SetSymbolValue SYM_EXISTINGNETPATH$, ExistingNetworkPath$
  407.     ELSE
  408.         SetSymbolValue SYM_EXISTINGNETPATH$, ""
  409.     END IF
  410.  
  411.     'Built the default components directory location
  412.     '************************************************
  413.     '    IN Standalone OR node single product
  414.     '       preexisting one  OR
  415.     '       ParentDir+gCOMPONENET
  416.     '    IN Standalone OR node suite
  417.     '       preexisting one  OR
  418.     '       BaseDir+gCOMPONENET
  419.     '    IN Server single product
  420.     '       ParentDir+gCOMPONENET
  421.     '    IN Server suite
  422.     '       BaseDir+gCOMPONENET
  423.     '    IN Distribution single product OR suite
  424.     '       Do not set components directory
  425.     'print "building the default components dir; ExistingLocalPath$=",ExistingLocalPath$
  426.  
  427.     IF ExistingLocalPath$ <> "" THEN
  428.         IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
  429.             'print "in standard or node with preexisting compDir"
  430.             componentsDir$ = LCASE$(ExistingLocalPath$)+"\"
  431.         ELSEIF network$ = gSERVER$ THEN
  432.             IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  433.                 componentsDir$ = GetSymbolValue(SYM_PARENTDIR)+gCOMPONENTS$+"\"
  434.             ELSE   'gSMARTSUITE$
  435.                 componentsDir$ = GetSymbolValue(SYM_BASEDIR)+gCOMPONENTS$+"\"
  436.             END IF
  437.         END IF
  438.     ELSE   'if no preexisting local component
  439.         'print " no preexisting comp dir"
  440.         IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  441.             'print "in single prod"
  442.             componentsDir$ = GetSymbolValue(SYM_PARENTDIR)+gCOMPONENTS$+"\"
  443.         ELSE   'gSMARTSUITE$
  444.             componentsDir$ = GetSymbolValue(SYM_BASEDIR)+gCOMPONENTS$+"\"
  445.         END IF
  446.     END IF
  447.     IF ExistingLocalPath$ = "" OR network$ <> gDISTRIBUTION$ THEN
  448.         SetSymbolValue SYM_COMPONENTSDIR$,componentsDir$
  449.         'print "componentsDir$ in INITShare32", componentsDir$
  450.     END IF
  451.  
  452.     'print "GetSymbolValue(SYM_COMPONENTSDIR$)=", GetSymbolValue(SYM_COMPONENTSDIR$)
  453.     'Set the name of the component dir
  454.     SetSymbolValue SYM_COMPONENTSDIR$+gNAME$, LdString(SID_SHARED_LOTUS_TOOLS)
  455.     'print "2"   
  456.  
  457.     '*** AUTOMATION: single product & suite server install get compnent dir from
  458.     '*** response file.
  459.     IF GetSymbolValue (SYM_AUTOMATIONINST$) = gTRUE$ AND _
  460.         network$ = gSERVER$   THEN
  461.         componentsDir$ = Lot_GetKeyValFromResponseFile("Shared Components","COMPONENTSDIR")
  462.         IF RIGHT$(componentsDir$, 1) <> "\" THEN
  463.             componentsDir$ = componentsDir$+ "\"
  464.         END IF
  465.         IF ValidatePath (componentsDir$) <> FALSE THEN
  466.             SetSymbolValue SYM_COMPONENTSDIR$,componentsDir$
  467.             'print "in automation"                            
  468.         ELSE
  469.             ErrorMsg SID_ERR_AUTO_INSTALL, LdString (SID_ERR_AUTO_COMPNENTSDIR)
  470.             ERROR STFQUIT
  471.         END IF
  472.     END IF
  473.       
  474.     'Set NETCOMPONENT symbol
  475.     '***********************
  476.     IF network$ = gNODE$ THEN
  477.         'Get the current working directory
  478.         cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
  479.         source$ = GetSymbolValue(SYM_STF_SRCDIR$)
  480.         gInstallIniFile$ = cwd$+gINSTALLINI$
  481.         rc% = DoesFileExist(gInstallIniFile$,femExists)
  482.         IF rc% = 1 THEN
  483.             netComponentIni$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$)
  484.            netComponent$ = Lot_LocalGetPathFromIni(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$,NULLSTROK,INVALIDSTROK)
  485.            'print netComponent$,"netComponent$ in share32.lss"
  486.            SameFlag$ = GetIniKeyString(gInstallIniFile$, _
  487.                "Server Configuration of Shared Tools", _
  488.                "SameDriveForComponent")
  489.            'print SameFlag$,"SameFlag$"
  490.            IF netComponent$ = "" THEN
  491.                    '** TV: netComponent comes back empty (win32) beacuse FValidPath fails
  492.             '** if the drive does not exist    
  493.                   rv% = 0
  494.                          IF SameFlag$ = "1" THEN
  495.                      netComponent$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$)
  496.                      IF netComponent$ <> "" AND NOT Lot_IsUnvalidatedUNCPath(netComponent$) THEN
  497.                         Lot_SplitAnyPath netComponent$, possibleDrv$, componentsDir$
  498.                         netComponent$ = Lot_GetVol(source$)+componentsDir$
  499.                       rv% = Lot_CleanPath(netComponent$)
  500.                      END IF
  501.                    END IF
  502.                       IF rv% = 0 THEN
  503.                   'print "0", gInstallIniFile$
  504.                '   ErrorMsg SID_ERR_INSTALLINI_CORRUPT, CHR$(10) + CHR$(10)+netComponent$
  505.                'gEndStatementEncountered% = TRUE
  506.                 PopupMappingErrorMsgExit(netComponentIni$)
  507.                EXIT FUNCTION
  508.                'FatalErrorMsg SID_ERR_INSTALLINI_CORRUPT, netComponent$, STFQUIT
  509.              ELSE
  510.                SetSymbolValue SYM_NETCOMPONENT$, netComponent$
  511.                  END IF
  512.               ELSE
  513.             IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(netComponent$) THEN
  514.                 Lot_SplitAnyPath netComponent$, possibleDrv$, componentsDir$
  515.                 SetSymbolValue SYM_NETCOMPONENT$, Lot_GetVol(source$)+componentsDir$
  516.             ELSE
  517.                 SetSymbolValue SYM_NETCOMPONENT$, netComponent$
  518.             END IF
  519.            END IF
  520.  
  521.              ELSE
  522.             'print "1", gInstallIniFile$
  523.             ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
  524.                 gEndStatementEncountered% = TRUE
  525.                 EXIT FUNCTION
  526.                'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
  527.         END IF
  528.  
  529.     END IF
  530.  
  531.     '*** Should compare SYM_EXISTINGNETPATH$ and SYM_NETCOMPONENT$ at this point
  532.     '*** and tell the user that a previous node install will not be valid if they 
  533.     '*** choose to continue with dialog YES/EXIT INSTALL
  534.     '!! JMD@
  535.  
  536.     'Initialize global gLotusIniPath$
  537.     gLotusIniPath$ = CreateBuffer$(256)
  538.     notused% = Lot_GetLotusiniPath(gLotusIniPath$)
  539.     'print gLotusIniPath$,"gLotusIniPath$"
  540.  
  541.     gLotusappIniPath$=CreateBuffer(256)
  542.     gLotusBcfDir$=CreateBuffer(256)
  543.  
  544.   'print"4"   
  545.   'print GetSymbolValue(SYM_COMPONENTSDIR$)
  546.     'For now, the local user directory is the local components directory,
  547.     'c:\lotus\compnent, e.g.
  548.     SetSymbolValue SYM_LOTUSUSERDIR$, GetSymbolValue(SYM_COMPONENTSDIR$)
  549. END FUNCTION
  550. '*************************************************************************
  551.  
  552.  
  553. PUBLIC FUNCTION ConfigSHARE32 () AS INTEGER
  554. '** Purpose:    Read the copy list and depending on the Shared tools 
  555. '**             installed update lotus.ini and lotusapp.ini
  556. '** Author:     MZ
  557. '** Arguments:  None
  558. '** Returns:    SUCCESS
  559. '*************************************************************************
  560.    DIM NetworkIns$, notused%
  561.  
  562.    ' this will be replaced with Populate... and WriteShare32...
  563. '   notused% = Lot_GetAllShared32Installed()
  564.  
  565.    notused% = Lot_GetLotusappiniPath(gLotusappIniPath, gLotusappDir, gLotusBcfDir)
  566.  
  567.    '** Execute the rest only if there is a registered product that supports 
  568.    '** share Prods(i%)Share=1
  569.    IF Lot_AreShare32ToolsSupported()=1 THEN
  570.       'Write the INI files for standard and node install and save the config in server
  571.       NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  572.  
  573.       IF NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$ THEN
  574.      'print "before calling WriteReg"
  575.       notused% = Lot_WriteRegistryLocalNetworkPath()
  576.       ELSEIF NetworkIns$ = gSERVER$ THEN
  577.       'Save the server configuration in the install.ini (to be used by the node install)
  578.       notused% = Lot_Save32ShareConfigInInstallIni()
  579.       END IF
  580.       IF Lot_IsTheFeatureInstalled("WIN32SHRDBASEPRG")=1 OR _
  581.      Lot_IsTheFeatureInstalled("WIN32SHRINFORMIXPRG")=1 OR _
  582.      Lot_IsTheFeatureInstalled("WIN32SHRIBMPRG")=1 OR _
  583.      Lot_IsTheFeatureInstalled("WIN32SHRSQLPRG")=1 OR _
  584.      Lot_IsTheFeatureInstalled("WIN32SHRPARADOXPRG")=1 OR _
  585.      Lot_IsTheFeatureInstalled("WIN32SHRNOTESSQLPRG")=1 OR _
  586.      Lot_IsTheFeatureInstalled("WIN32SHRSPREADSHEETPRG")=1 OR _
  587.      Lot_IsTheFeatureInstalled("WIN32SHRIBMDB2PRG")=1 OR _
  588.      Lot_IsTheFeatureInstalled("WIN32SHRDB2SQLDSPRG")=1 OR _
  589.      Lot_IsTheFeatureInstalled("WIN32SHRDB2_SQL400PRG")=1 OR _
  590.      Lot_IsTheFeatureInstalled("WIN32SHRIBM_DDCS_2PRG")=1 OR _
  591.      Lot_IsTheFeatureInstalled("WIN32SHRODBCDRVRPRG")=1 OR _
  592.      Lot_IsTheFeatureInstalled("WIN32SHRODBCWKSPRG")=1 OR _
  593.      Lot_IsTheFeatureInstalled("WIN32SHRODBCTEXTPRG")=1 OR _
  594.      Lot_IsTheFeatureInstalled("WIN32SHRORACLEPRG")=1 OR _
  595.      Lot_IsTheFeatureInstalled("WIN32SHRODBCBTRIEVEPRG")=1 OR _
  596.      Lot_IsTheFeatureInstalled("WIN32SHRODBCFOXBASEPRG")=1 OR _
  597.      Lot_IsTheFeatureInstalled("WIN32SHRODBCACCESSPRG")=1 OR _
  598.      Lot_IsTheFeatureInstalled("WIN32SHRODBCPARADOXPRG")=1 OR _
  599.      Lot_IsTheFeatureInstalled("WIN32SHRODBCDB2PRG")=1 OR _
  600.      Lot_IsTheFeatureInstalled("WIN32SHRODBCORACLEPRG")=1 OR _
  601.      Lot_IsTheFeatureInstalled("WIN32SHRODBCSQLSVRPRG")=1 THEN 
  602.         g32DataLensInstalled = 1
  603.        ELSE
  604.         g32DataLensInstalled = 0
  605.       END IF
  606.  
  607.       'Write lotus.bcf file
  608.       'print STR$(g32DataLensInstalled)
  609.       IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gSERVER$) AND _
  610.      g32DataLensInstalled = 1 THEN
  611. '         notused% = Lot_WriteLotusBcfFile()
  612.       END IF
  613.  
  614.  
  615.       IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$) AND _
  616.      g32DataLensInstalled = 1 THEN
  617. '         notused% = Lot_WriteODBCINST()
  618.       END IF     
  619.       'Write the Registry
  620.       Lot_WriteShare32InTheRegistry
  621.  
  622.    END IF
  623.  
  624.  
  625. ConfigSHARE32=SUCCESS
  626. END FUNCTION
  627. '*************************************************************************
  628.  
  629. PUBLIC FUNCTION AddSHARE32Icons() AS INTEGER
  630. '** Purpose:   Puts up the shared tools icons
  631. '** Author:    MZ
  632. '** Returns:   1 if success
  633. '***************************************************
  634. DIM grouptitle$,Lotusappdir$,dlgeditor$,Network$, IconName$
  635. DIM Feature$
  636.  
  637.    IF Lot_AreShare32ToolsSupported()=1 THEN
  638.  
  639.      Network$ = GetSymbolValue(SYM_NETWORK$)
  640.      grouptitle$ = Reg_GetProgManagerGroupName(1)
  641. '      IconName$ = LdString(SID_LOTDIALOGEDITOR)
  642. '      Feature$ = "SHRDLGPRG"
  643.      '** DIALOG EDITOR   
  644.      If network$ = gSTANDARD$ Then
  645.         If (FIsKeywordinCopyList (Feature$) = 1) Then   
  646. '           Lotusappdir$= GetSymbolValue(SYM_LOTUSAPPDIR$)
  647.  '          dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
  648.   '           If IsNewShell() THEN
  649.   '              notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
  650.   '            notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
  651.   '            Else    
  652.   '             CreateProgmanItem  grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
  653.   '            End If
  654.         End If
  655.      ElseIf network$ = gNODE$ Then
  656.         If Lot_IsTheFeatureInstalled("SHRDLGPRG") = 1 Then 
  657. '           Lotusappdir$= GetSymbolValue(SYM_NETLOTUSAPP$)
  658.  '          dlgeditor$ = Lotusappdir$+LdString(SID_LOTDIALOGEDITORDIR)+LdString(SID_LOTDIALOGEDITOREXE)
  659.   '           If IsNewShell() THEN
  660.   '              notused%=Lot_AddLinkToFolder(1, dlgeditor$, IconName$+".lnk", IconName$, "", Lotusappdir$)
  661.   '            notused%=Lot_RegisterObject(Feature$, UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(1)+IconName$+".lnk")
  662.   '            Else    
  663.   '             CreateProgmanItem  grouptitle$, IconName$, dlgeditor$, "", cmoOverwrite
  664.   '            End If
  665.         End If
  666.      End If
  667.   END IF
  668. AddSHARE32Icons=SUCCESS
  669. END FUNCTION
  670. '*************************************************************************
  671.  
  672.  
  673. FUNCTION Lot_GetAllShared32Installed() AS INTEGER
  674. '** Purpose:    This function searches the copy list and populates the 
  675. '**             RegEntry list with the entries that have to be updated
  676. '**             for standalone install and reades the cinstall.ini for
  677. '**             node install
  678. '** Author:     MZ
  679. '** Arguments:  None
  680. '** Symbols Out:RegEntry
  681. '** Returns:    SUCCESS
  682. '*************************************************************************
  683.    DIM network$,currchpt$,sharedid$
  684.    DIM SectionPref$,SectionNumber%,SectionTag$,SectionName$
  685.    DIM INFSecKeyWordPref$, INFSecKeyWordNum%, INFSecKeyWordTag$, INFSecKeyWordName$
  686.    DIM INFShrKey$,gSharedIniFile$
  687.  
  688.    IF Lot_AreShare32ToolsSupported()=1 THEN
  689.  
  690.      gSharedIniFile$ = Lot_GetSharedIniPathName()
  691.      network$ = GetSymbolValue(SYM_NETWORK$)
  692.      IF network$ = gSTANDARD$ THEN
  693.         'The call to Lot_GetChapterValStr returns a comment when no value is found
  694.  
  695.         CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT) 
  696.         WHILE (CurrChpt$ <> "")
  697.        SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)   
  698.               IF SharedID$ <> "" THEN
  699.                  IF MID$(SharedID$,1,5) = "WIN32" THEN
  700.                     INFSecKeyWordName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD)   
  701.  
  702.              'print SharedID$,INFSecKeyWordName$,"Add KeyWord"
  703.              AddListItem SYM_REGENTRY$,INFSecKeyWordName$
  704.           END IF
  705.        END IF
  706.        CurrChpt$ = Lot_GetNext() 
  707.         WEND
  708.         Lot_GetAllShared32Installed = SUCCESS
  709.  
  710.         'End of the processing for STANDARD
  711.  
  712.       ELSEIF network$ = gNODE$ THEN
  713.  
  714.         'Initialize the loop
  715.         SectionPref$="Section"
  716.         SectionNumber%=1
  717.         SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  718.         'print "SectionTag$",SectionTag$ 
  719.         'print "gSharedIniFile$ where used",gSharedIniFile$ 
  720.         SectionName$ = GetIniKeyString(gSharedIniFile$,_
  721.                      "Win32 Sections",_ 
  722.                      SectionTag$)
  723.         'print "SectionName$",SectionName$
  724.  
  725.         'Using the shared.ini as a data driver I find all the shared sections installed
  726.         '
  727.         DO
  728.        'Process Program section
  729.        '***********************
  730.        'Process User, Data, and Filter section
  731.        '**************************************
  732.         FORALL SectType IN SectTypeList
  733.         
  734.        INFShrKey$ = GetIniKeyString(gSharedIniFile$,_
  735.                      SectionName$+" "+SectType,_
  736.                      "INFSharedKey")
  737.        'print INFShrKey$,"INFShrKey$"
  738.        IF INFShrKey$ <> "" THEN
  739.  
  740.           'Initialize the loop
  741.           INFSecKeyWordPref$="INFSectionKeyword"
  742.           INFSecKeyWordNum%=1
  743.           INFSecKeyWordTag$=INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
  744.           'print "INFSecKeyWordTag$",INFSecKeyWordTag$ 
  745.           INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
  746.                          SectionName$+" "+SectType,_
  747.                          INFSecKeyWordTag$)
  748.           'print "INFSecKeyWordName$",INFSecKeyWordName$
  749.           'print "SectionName$", SectionName$
  750.  
  751.           DO
  752.  
  753.              IF INFSecKeyWordName$ <> "" THEN
  754.             IF Lot_IsTheFeatureInstalled(INFSecKeyWordName$) THEN
  755.                AddListItem SYM_REGENTRY$,INFSecKeyWordName$
  756.             END IF
  757.              END IF
  758.  
  759.              INFSecKeyWordNum%=INFSecKeyWordNum%+1
  760.              INFSecKeyWordTag$=INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
  761.              'print "INFSecKeyWordTag$",INFSecKeyWordTag$ 
  762.              INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
  763.                             SectionName$+" "+SectType,_
  764.                             INFSecKeyWordTag$)
  765.  
  766.           LOOP UNTIL INFSecKeyWordName$ = ""
  767.        END IF
  768.  
  769.         END FORALL 
  770.  
  771.        SectionNumber%=SectionNumber%+1
  772.        SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  773.        'print "SectionTag$",SectionTag$ 
  774.        'print "gSharedIniFile$ where used",gSharedIniFile$ 
  775.        SectionName$ = GetIniKeyString(gSharedIniFile$, _
  776.                     "Win32 Sections",_ 
  777.                     SectionTag$)
  778.  
  779.          LOOP UNTIL SectionName$ = ""
  780.  
  781.      END IF
  782.  
  783.    END IF
  784.    Lot_GetAllShared32Installed = SUCCESS
  785.  
  786. END FUNCTION
  787.  
  788. '*************************************************************************
  789. FUNCTION Lot_WriteRegistryLocalNetworkPath() AS INTEGER
  790. '** Purpose:    This function writes into the Registry
  791. '** Author:     MZ
  792. '** Arguments:  None
  793. '** Symbols In: SYM_COMPONENTSDIR$,SYM_NETCOMPONENT$
  794. '** Returns:    SUCCESS
  795. '*************************************************************************
  796.    DIM RegEntryListLen%,network$,EntryCount%,Entry$,notused%
  797.    DIM LocCompPath$, NetCompPath$, LReturn&,KeyHandle&
  798.    DIM keyword$, chpt$, UserPath$
  799.  
  800.    IF Lot_AreShare32ToolsSupported()=1 THEN
  801.    
  802.       LocCompPath$=GetSymbolValue(SYM_COMPONENTSDIR$)
  803.       'print LocCompPath$,"LocCompPath$",LEN(LocCompPath$)
  804.       NetCompPath$=GetSymbolValue(SYM_NETCOMPONENT$) 
  805.       'print NetCompPath$,"NetCompPath$"
  806.       UserPath$=GetSymbolValue(SYM_LOTUSUSERDIR$)
  807.  
  808.       LocCompPath$=Lot_TrimEndSlash(LocCompPath$)
  809.       NetCompPath$=Lot_TrimEndSlash(NetCompPath$)
  810.       'print " before calling Lot_CreateRegKeyValueEx in share32"        
  811.  
  812.         
  813.       LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  814.                   gREGLOTUSCOMP, "LocalPath", REG_SZ,_
  815.                   LocCompPath$, LENBP(LocCompPath$)+1) ''** HISHI - Aug/23/95
  816.       
  817.           IF LReturn& <> ERROR_SUCCESS THEN
  818.            RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP,"LocalPath",LocCompPath$
  819.           END IF
  820.       '*** TV: HCU user path for Chart,Spell, Filters,etc.
  821.       LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_
  822.                 gREGLOTUSCOMP, _
  823.                "User Path", REG_SZ,_
  824.                 UserPath$, LENBP(UserPath$)+1) '' HISHI - 10/5/95
  825.  
  826.           IF LReturn& <> ERROR_SUCCESS THEN
  827.            RegErrorMsg SID_ERR_REG_GENERIC, gHCU$+"\"+gREGLOTUSCOMP,"UserPath",UserPath$
  828.           END IF
  829.  
  830.       'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn&        
  831.       network$ = GetSymbolValue(SYM_NETWORK$)
  832.       IF network$ = gNODE$ THEN
  833.          'Write NetComponent Path into the registry
  834.          LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  835.                       gREGLOTUSCOMP, "NetworkPath", REG_SZ,_
  836.                       NetCompPath$, LENBP(NetCompPath$)+1) ''** HISHI - Aug/23/95
  837.  
  838.               IF LReturn& <> ERROR_SUCCESS THEN
  839.                RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP,"NetworkPath",NetCompPath$
  840.               END IF
  841.  
  842.        'Create the paths if they don't exist
  843.        'and register the directory under the first product
  844.        chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
  845.        keyword$ = Lot_GetChapterValStr(chpt$, F_KEYWORD)   
  846.  
  847.        LReturn& = FDirExists ( LocCompPath$ )
  848.        IF (LReturn& <> 1) THEN 
  849.            Lot_CreateDirectory(LocCompPath$) 
  850.            Lot_RegisterObject keyword$, UNIN_CLASS_DIRECTORY$, LocCompPath$
  851.        END IF    
  852.  
  853.       END IF
  854.  
  855.       'Populate the 32SHAREDATA array of WIN32SHARED structures
  856.       Populate32SHAREDDATA
  857.  
  858.       ' For every entry write it in the registry
  859.       FOR EntryCount% = 1 TO RegEntryListLen%
  860.          Entry$ = GetListItem(SYM_REGENTRY$,EntryCount%)
  861.          'print Entry$,STR(EntryCount%)
  862.          IF Entry$<>"" THEN
  863.         notused% = Lot_WriteKey(Entry$)
  864.          END IF
  865.       Next
  866.       'print GetSymbolValue(SYM_COMPONENTSDIR$)
  867.    END IF
  868.  
  869.    Lot_WriteRegistryLocalNetworkPath = SUCCESS
  870. END FUNCTION
  871. '*************************************************************************
  872.  
  873.  
  874. FUNCTION Lot_WriteKey(Entry$) AS INTEGER
  875. '** Purpose:    This function writes an entry into the Registry
  876. '** Author:     MZ
  877. '** Arguments:  None
  878. '** Symbols In: 
  879. '** Returns:    SUCCESS
  880. '*************************************************************************
  881.  
  882.  
  883. Lot_WriteKey = SUCCESS
  884. END FUNCTION 
  885. '*************************************************************************
  886.  
  887.  
  888. SUB Populate32SHAREDDATA
  889. '** Purpose:    This subroutine is to populate the 32SHAREDATA array of 
  890. '**             WIN32SHARED structure by reading the data driver shared.ini
  891. '** Author:     MZ
  892. '** Arguments:  None
  893. '** Symbols In: 
  894. '** Returns:    SUCCESS
  895. '*************************************************************************
  896.    DIM network$,currchpt$,sharedid$, rc%
  897.    DIM SectionPref$,SectionNumber%,SectionTag$,SectionName$
  898.    DIM INFSecKeyWordPref$, INFSecKeyWordNum%, INFSecKeyWordTag$
  899.    DIM INFShrKey$,SectionExist%,INFSecKeyWordName$,gSharedIniFile$
  900.    DIM FilePref$,FileNumber%,FileTag$,FileName$,FileList$,KeyWordList$
  901.    DIM HelpFileNumber%
  902.    DIM DependsOnName$,DependsOnNameNum%,DependsOnNameTag$,DependsOnNameList$
  903.    DIM DependsOnVer$,DependsOnVerNum%, DependsOnVerTag$,DependsOnVerList$
  904.    DIM DependsOnNamePref$, DependsOnVerPref$ 
  905.  
  906.    gSharedIniFile$ = Lot_GetSharedIniPathName()
  907.    Shared32DataCount = 1
  908.  
  909.    'print "Shared32DataCount 1", Shared32DataCount
  910.    'print "gSharedIniFile$", gSharedIniFile$
  911.  
  912.    'Initialize the loop
  913.    SectionPref$="Section"
  914.    SectionNumber%=1
  915.    SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  916.    'print "SectionTag$",SectionTag$ 
  917.    'print "gSharedIniFile$ where used",gSharedIniFile$ 
  918.    SectionName$ = GetIniKeyString(gSharedIniFile$,_
  919.                   "Win32 Sections",_ 
  920.                   SectionTag$)
  921.    'print "SectionName$",SectionName$
  922.  
  923.    'Using the shared.ini as a data driver I find all the shared sections installed
  924.    '
  925.    DO
  926.       'Process All Section Types in SectTypeList
  927.       '*****************************************
  928.         FORALL SectType IN SectTypeList
  929.  
  930.       IF DoesIniSectionExist (gSharedIniFile$,SectionName$+" "+SectType) = 1 THEN
  931.       'print "result of the DoesIniSectionExist =",rc%
  932.  
  933.      '***Populate the SharedIniWin32SecName
  934.      Shared32Data(Shared32DataCount).SharedIniWin32SecName=_
  935.                      SectionName$+" "+SectType
  936.     'print Shared32Data(Shared32DataCount).SharedIniWin32SecName,"Shared32Data(Shared32DataCount).SharedIniWin32SecName"
  937.  
  938.      '***Populate the Win32ComponentName
  939.      Shared32Data(Shared32DataCount).Win32ComponentName=_
  940.               GetIniKeyString(gSharedIniFile$,SectionName$+" "+SectType,_
  941.                      "Win32ComponentName")
  942.     'print Shared32Data(Shared32DataCount).Win32ComponentName,"Shared32Data(Shared32DataCount).Win32ComponentName"
  943.  
  944.  
  945.      '***Populate the list ListOfFilesInWin32Section
  946.      'Initialize the loop
  947.      FilePref$ = "file"
  948.      FileNumber% = 1
  949.      FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  950.  
  951.      FileName$ = GetIniKeyString(gSharedIniFile$,_
  952.                      SectionName$+" "+SectType,_
  953.                      FileTag$)
  954.     'print FileName$,"FileName$"
  955.  
  956.      'make the filelist name 
  957.      FileList$ = "FileList"+LTRIM$(STR(Shared32DataCount))
  958.      IF FileName$ <> "" THEN
  959.  
  960.         DO
  961.           
  962.            SetListItem FileList$,  FileNumber%, FileName$
  963.            FileNumber% = FileNumber% + 1
  964.            FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  965.            FileName$ = GetIniKeyString(gSharedIniFile$,_
  966.                      SectionName$+" "+SectType,_
  967.                      FileTag$)
  968.            'print FileName$,"FileName$"
  969.         LOOP UNTIL FileName$ =""
  970.      ELSE
  971.         SetListItem FileList$,  FileNumber%, FileName$
  972.      END IF
  973.  
  974.      'Determine the associated help files for the current language
  975.      FilePref$ = "helpfile"
  976.      FileNumber% = 1
  977.      HelpFileNumber% = 1
  978.      FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  979.      'Save the helpfile names for the current language
  980.      DO
  981.          FileName$ = GetIniKeyString(gSharedIniFile$,_
  982.                              SectionName$+" "+SectType, FileTag$)
  983.         IF Lot_GetNthFieldFromIniString (FileName$, 1, "") = _
  984.                 GetSymbolValue(SYM_INSTALL_LANGUAGE$) THEN
  985.             FileName$ = Lot_GetNthFieldFromIniString (FileName$, 2, "")        
  986.             Shared32Data(Shared32DataCount).HelpFileNames = "HelpFiles"+ _
  987.                 LTRIM$(STR(Shared32DataCount))
  988.             SetListItem Shared32Data(Shared32DataCount).HelpFileNames, _
  989.                 HelpFileNumber%, FileName$
  990.             HelpFileNumber% = HelpFileNumber% + 1
  991.         END IF
  992.         FileNumber% = FileNumber% + 1
  993.         FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
  994.      LOOP UNTIL FileName$ =""
  995.  
  996.      '***Populate DestSubdir
  997.      Shared32Data(Shared32DataCount).DestSubdir=_
  998.                      GetIniKeyString(gSharedIniFile$,_
  999.                          SectionName$+" "+SectType,_ 
  1000.                          "DestSubdir")
  1001.     'print Shared32Data(Shared32DataCount).DestSubdir,"Shared32Data(Shared32DataCount).DestSubdir"
  1002.  
  1003.      '***Populate INFSharedKey
  1004.      Shared32Data(Shared32DataCount).INFSharedKey=_
  1005.                      GetIniKeyString(gSharedIniFile$,_
  1006.                          SectionName$+" "+SectType,_ 
  1007.                          "INFSharedKey")
  1008.    
  1009.      '***Populate the list ListOfINFSectionKeywords
  1010.      'Initialize the loop
  1011.      INFSecKeyWordPref$ = "INFSectionKeyword"
  1012.      INFSecKeyWordNum% = 1
  1013.      INFSecKeyWordTag$ = INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
  1014.  
  1015.      INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
  1016.                      SectionName$+" "+SectType,_
  1017.                      INFSecKeyWordTag$)
  1018.     'print INFSecKeyWordName$,"INFSecKeyWordName$" 
  1019.  
  1020.      'make the KeyWordList name 
  1021.      KeyWordList$ = "KeyWordList"+LTRIM$(STR(Shared32DataCount))
  1022.  
  1023.      IF INFSecKeyWordName$ <> "" THEN
  1024.          DO
  1025.  
  1026.            SetListItem KeyWordList$, INFSecKeyWordNum%, INFSecKeyWordName$
  1027.            INFSecKeyWordNum% = INFSecKeyWordNum% + 1
  1028.            INFSecKeyWordTag$ = INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
  1029.            INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
  1030.                          SectionName$+" "+SectType,_
  1031.                          INFSecKeyWordTag$)
  1032.            'print INFSecKeyWordName$,"INFSecKeyWordName$" 
  1033.         LOOP UNTIL INFSecKeyWordName$ =""
  1034.      ELSE
  1035.         SetListItem KeyWordList$, INFSecKeyWordNum%, INFSecKeyWordName$
  1036.      END IF
  1037.  
  1038.      '***Populate IniFileName
  1039.      IF SectType = "Program" THEN
  1040.          Shared32Data(Shared32DataCount).IniFileName=_
  1041.                      GetIniKeyString(gSharedIniFile$,_
  1042.                          SectionName$+" "+SectType,_ 
  1043.                          "IniFileName")
  1044.     'print Shared32Data(Shared32DataCount).IniFileName,"Shared32Data(Shared32DataCount).IniFileName" 
  1045.     END IF
  1046.  
  1047.      '***Populate IniSectionName
  1048.      Shared32Data(Shared32DataCount).IniSectionName=_
  1049.                      GetIniKeyString(gSharedIniFile$,_
  1050.                          SectionName$+" "+SectType,_ 
  1051.                          "IniSectionName")
  1052.     'print Shared32Data(Shared32DataCount).IniSectionName,"Shared32Data(Shared32DataCount).IniSectionName" 
  1053.  
  1054.  
  1055.      '***Populate IniEntryName
  1056.      Shared32Data(Shared32DataCount).IniEntryName=_
  1057.                      GetIniKeyString(gSharedIniFile$,_
  1058.                          SectionName$+" "+SectType,_ 
  1059.                          "IniEntry")
  1060.  
  1061.      '***Populate KeyFileName
  1062.      Shared32Data(Shared32DataCount).KeyFileName=_
  1063.                      GetIniKeyString(gSharedIniFile$,_
  1064.                          SectionName$+" "+SectType,_ 
  1065.                          "KeyFileName")
  1066.      'printShared32Data(Shared32DataCount).KeyFileName,"Shared32Data(Shared32DataCount).KeyFileName" 
  1067.  
  1068.  
  1069.      '***Populate the RegistrationKey
  1070.      Shared32Data(Shared32DataCount).RegistrationKey=_
  1071.                      GetIniKeyString(gSharedIniFile$,_
  1072.                          SectionName$+" "+SectType,_ 
  1073.                          "RegistrationKey")
  1074.      'printShared32Data(Shared32DataCount).RegistrationKey,"Shared32Data(Shared32DataCount).RegistrationKey" 
  1075.  
  1076.      '***Populate the Version
  1077.      Shared32Data(Shared32DataCount).Version=_
  1078.                      GetIniKeyString(gSharedIniFile$,_
  1079.                          SectionName$+" "+SectType,_ 
  1080.                          "Version")
  1081.      'printShared32Data(Shared32DataCount).Version,"Shared32Data(Shared32DataCount).Version" 
  1082.  
  1083.      '***Populate the list ListOfDependsOnNames
  1084.      'Initialize the loop
  1085.      DependsOnNamePref$ = "DependsOnName"
  1086.      DependsOnNameNum% = 1
  1087.      DependsOnNameTag$ = DependsOnNamePref$+LTRIM$(STR(DependsOnNameNum%))
  1088.  
  1089.      DependsOnName$ = GetIniKeyString(gSharedIniFile$,_
  1090.                      SectionName$+" "+SectType,_
  1091.                      DependsOnNameTag$)
  1092.      'print DependsOnName$,"DependsOnName$" 
  1093.  
  1094.      'make the DependsOnNameList name 
  1095.      DependsOnNameList$ = "DependsOnNameList"+LTRIM$(STR(Shared32DataCount))
  1096.  
  1097.      IF DependsOnName$ <> "" THEN
  1098.          DO
  1099.  
  1100.            SetListItem DependsOnNameList$, DependsOnNameNum%, DependsOnName$
  1101.            DependsOnNameNum% = DependsOnNameNum% + 1
  1102.            DependsOnNameTag$ = DependsOnNamePref$+LTRIM$(STR(DependsOnNameNum%))
  1103.            DependsOnName$ = GetIniKeyString(gSharedIniFile$,_
  1104.                          SectionName$+" "+SectType,_
  1105.                          DependsOnNameTag$)
  1106.            'print DependsOnName$,"DependsOnName$" 
  1107.         LOOP UNTIL DependsOnName$ =""
  1108.      ELSE
  1109.         SetListItem DependsOnNameList$, DependsOnNameNum%, DependsOnName$
  1110.         'print DependsOnName$,"DependsOnName$ if empty" 
  1111.      END IF
  1112.  
  1113.  
  1114.      '***Populate the list ListOfDependsOnVers
  1115.      'Initialize the loop
  1116.      DependsOnVerPref$ = "DependsOnVer"
  1117.      DependsOnVerNum% = 1
  1118.      DependsOnVerTag$ = DependsOnVerPref$+LTRIM$(STR(DependsOnVerNum%))
  1119.  
  1120.      DependsOnVer$ = GetIniKeyString(gSharedIniFile$,_
  1121.                      SectionName$+" "+SectType,_
  1122.                      DependsOnVerTag$)
  1123.      'print DependsOnVer$,"DependsOnVer$" 
  1124.  
  1125.      'make the DependsOnVerList name 
  1126.      DependsOnVerList$ = "DependsOnVerList"+LTRIM$(STR(Shared32DataCount))
  1127.  
  1128.      IF DependsOnVer$ <> "" THEN
  1129.          DO
  1130.  
  1131.            SetListItem DependsOnVerList$, DependsOnVerNum%, DependsOnVer$
  1132.            DependsOnVerNum% = DependsOnVerNum% + 1
  1133.            DependsOnVerTag$ = DependsOnVerPref$+LTRIM$(STR(DependsOnVerNum%))
  1134.            DependsOnVer$ = GetIniKeyString(gSharedIniFile$,_
  1135.                          SectionName$+" "+SectType,_
  1136.                          DependsOnVerTag$)
  1137.            'print DependsOnVer$,"DependsOnVer$" 
  1138.         LOOP UNTIL DependsOnVer$ =""
  1139.      ELSE
  1140.         SetListItem DependsOnVerList$, DependsOnVerNum%, DependsOnVer$
  1141.         'print DependsOnVer$,"DependsOnVer$ if empty" 
  1142.      END IF
  1143.  
  1144.  
  1145.  
  1146.      Shared32DataCount = Shared32DataCount+1
  1147.      'print Shared32DataCount,"Shared32DataCount 2"
  1148.       END IF ' end of processing all section types
  1149.         
  1150.         END FORALL 
  1151.  
  1152.       SectionNumber%=SectionNumber%+1
  1153.       SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
  1154.       'print "SectionTag$",SectionTag$ 
  1155.       'print "gSharedIniFile$ where used",gSharedIniFile$ 
  1156.       SectionName$ = GetIniKeyString(gSharedIniFile$,_
  1157.                      "Win32 Sections",_ 
  1158.                      SectionTag$)     
  1159.       'print "SectionName$",SectionName$ 
  1160.  
  1161.    LOOP UNTIL SectionName$ = ""
  1162.  
  1163.  
  1164. END SUB
  1165.  
  1166.  
  1167. '*************************************************************************
  1168. PUBLIC FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
  1169. '** Purpose: This function is called whenever we need to retrieve a string
  1170. '**           from .ini file. Function returns a clean path (path returned from
  1171. '**           FCleanFatPath.    
  1172. '** Author:    JKK/MZ
  1173. '** Arguments:  Name of the .ini file, section name in the .ini file, key we
  1174. '**             are searching for and two integer flags, nullflag% & invalidpath%.
  1175. '**             Function puts up two error messages based on the value of nullflag%, and 
  1176. '**             invalidpath. 
  1177. '** Returns:   Function either returns null or the value of the string.
  1178. '**     
  1179. '*************************************************************************
  1180.   DIM rstring$, rv%, errText$
  1181.  
  1182.    Lot_LocalGetPathFromIni = ""
  1183.    rstring$ = GetIniKeyString(szFile$, szSect$, szKey$)
  1184.  
  1185.    If rstring$ <> "" Then
  1186.       rv% = Lot_CleanPath(rstring$)
  1187.  
  1188.       if rv% <> 0 Then
  1189.      Lot_LocalGetPathFromIni = rstring$
  1190.       elseif invalidpathflag% <> FALSE then
  1191.         Lot_LocalGetPathFromIni = ""
  1192.         EXIT FUNCTION
  1193.      end if 
  1194.  
  1195.       elseif nullflag% <> FALSE then
  1196.      Lot_LocalGetPathFromIni = ""
  1197.      EXIT FUNCTION
  1198.  
  1199.    else
  1200.       Lot_LocalGetPathFromIni = ""
  1201.    end if 
  1202.  
  1203. END FUNCTION
  1204.  
  1205. PUBLIC FUNCTION Lot_GetLotusiniPath(gLotusIniPath$) AS INTEGER
  1206. '** Purpose:    This function builds and sets the global for lotus.ini 
  1207. '**             path 
  1208. '** Author:     MZ
  1209. '** Arguments:  gLotusIniPath$
  1210. '** Returns:    SUCCESS
  1211. '*************************************************************************
  1212.    'Get the path to the lotus.ini
  1213.    gLotusIniPath$ = MakePath( GetWindowsDir(), gLOTUSINI$)
  1214.  
  1215.    Lot_GetLotusiniPath = SUCCESS
  1216.  
  1217. END FUNCTION
  1218. '*************************************************************************
  1219.  
  1220.  
  1221. PUBLIC FUNCTION Lot_GetSharedIniPathName() AS STRING
  1222. '** Purpose:   Builds the path to the datadriver file shared.ini
  1223. '** Author:    MZ
  1224. '** Returns:   the path$ to shared.ini
  1225. '*************************************************************************
  1226. DIM cwd$,gSharedIniFile$
  1227.    'Get the current working directory
  1228.    cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
  1229.    gSharedIniFile$ = MakePath(cwd$,gSHAREDINI$)
  1230.    Lot_GetSharedIniPathName=gSharedIniFile$
  1231. END FUNCTION
  1232. '*************************************************************************
  1233.  
  1234.  
  1235. PUBLIC FUNCTION Lot_GetLotusappiniPath(gLotusappIniPath$, gLotusappDir$, gLotusBcfDir$) AS INTEGER
  1236. '** Purpose:    This function builds and sets the global for lotusapp.ini 
  1237. '**             path and directory
  1238. '** Author:     MZ
  1239. '** Arguments:  gLotusappIniPath$, gLotusappDir$,gLotusBcfDir$
  1240. '** Returns:    SUCCESS
  1241. '*************************************************************************
  1242.    'Get the path to lotusapp.ini 
  1243.     gLotusappIniPath$=gLotusappDir$+"lotusapp.ini"
  1244.  
  1245.    'Get the path to lotus.BCF 
  1246.    gLotusBcfDir$ = gLotusappDir$+"datalens\"+ gLOTUSBCF$
  1247.    'print "where this is set gLotusBcfDir",gLotusBcfDir
  1248.  
  1249.    Lot_GetLotusappiniPath = SUCCESS
  1250.  
  1251. END FUNCTION
  1252. '*************************************************************************
  1253.  
  1254. FUNCTION Lot_Save32ShareConfigInInstallIni() AS INTEGER
  1255. '** Purpose:   Saves the components dir and SameDriveForComponent flag  
  1256. '**            into install.ini in the section [Server Configuration of  
  1257. '**            Shared Tools];  This is needed at Node install time
  1258. '** Author:    MZ
  1259. '** Arguments: None
  1260. '** Returns:   SUCCESS
  1261. '*************************************************************************
  1262. DIM networkins$,proddir$,ginstallinifile$,proddrv$
  1263. DIM componentsdir$, componentsdrv$
  1264.  
  1265.    'Identify if I am in server install
  1266.    NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
  1267.    IF Lot_AreShare32ToolsSupported()=1 THEN
  1268.  
  1269.       IF NetworkIns$=gSERVER$ THEN
  1270.  
  1271.          'Built the path to install.ini
  1272.          prodDir$ = Lot_GetInstallDir()
  1273.          gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
  1274.  
  1275.          'Log the COMPONENT directory
  1276.          componentsDir$ = GetSymbolValue(SYM_COMPONENTSDIR$)
  1277.          CreateIniKeyValue gInstallIniFile$,_
  1278.             "Server Configuration of Shared Tools",_
  1279.             SYM_COMPONENTSDIR$, _
  1280.             componentsDir$,_
  1281.             cmoOverwrite
  1282.  
  1283.          'Log a flag that tells if the product is in the same drive with components
  1284.          prodDrv$ = LCASE$(Lot_GetVol(prodDir$))
  1285.          componentsDrv$ = LCASE$(Lot_GetVol(componentsDir$))
  1286.          IF prodDrv$ = componentsDrv$ THEN
  1287.         CreateIniKeyValue gInstallIniFile$,_
  1288.                "Server Configuration of Shared Tools",_
  1289.                "SameDriveForComponent",_
  1290.                "1", cmoOverwrite
  1291.          ELSE
  1292.         CreateIniKeyValue gInstallIniFile$,_
  1293.                "Server Configuration of Shared Tools",_
  1294.                "SameDriveForComponent", "0", cmoOverwrite
  1295.          END IF
  1296.  
  1297.  
  1298.       END IF
  1299.    END IF
  1300.  
  1301.    Lot_Save32ShareConfigInInstallIni = SUCCESS
  1302. END FUNCTION
  1303.  
  1304. '*************************************************************************
  1305.  
  1306. SUB Lot_WriteShare32InTheRegistry
  1307. '** Purpose:    This subroutine is to use the 32SHAREDATA array of 
  1308. '**             WIN32SHARED structure and write the registry key if the feature was installed
  1309. '** Author:     MZ
  1310. '** Arguments:  None
  1311. '** Symbols In: 
  1312. '** Returns:    SUCCESS
  1313. '*************************************************************************
  1314. DIM NumOfStrucs%, StrucCount%, KeyWordListLen%, KeyWordCount%, InstalledFlag%
  1315. DIM KWList$, KeyWordName$,Network$,LReturn&, ComponentNameAndVer$, path$, ver$
  1316. DIM DependsOnNameList$,DependsOnVerList$,DependsOnListLen%,DependsOnCount% 
  1317. DIM ListLength%, FileName$, ListName$, Count%, s$, KeyWordList$, i%, kw$
  1318. DIM gInstallIniFile$,cwd$,prodDir$,lenVer%, dirSym$, inidir$
  1319. DIM LocCompPath$, file$, keyvalname1$, keyval1&, keyvalname2$, keyval2&
  1320. DIM CompPath$, UserPath$
  1321.     IF Lot_AreShare32ToolsSupported() <> 1 THEN EXIT SUB
  1322.  
  1323.    'Get how many shared32 sections I have to process
  1324.    NumOfStrucs% = Shared32DataCount
  1325.    IF NumOfStrucs% = 0 THEN EXIT SUB
  1326.  
  1327.    Network$ = GetSymbolValue(SYM_NETWORK$)
  1328.  
  1329.    'Built the path to install.ini
  1330.    IF Network$ = gNODE$ THEN
  1331.       'Get the current working directory
  1332.       'cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
  1333.       'gInstallIniFile$ = cwd$+gINSTALLINI$
  1334.        dirSym$ = Reg_GetDirSymbolList(1)       '** First product dir list
  1335.     IF GetListLength(dirSym$) >= 1 THEN
  1336.         dirSym$ = GetListItem(dirSym$, 1)    '** First directory symbol
  1337.         inidir$ = GetSymbolValue(dirSym$) 
  1338.               gInstallIniFile$ = MakePath(inidir$,"cinstnod.ini")
  1339.     END IF
  1340.    ELSEIF Network$=gSERVER$ OR Network$=gSTANDARD THEN
  1341.       'Get the install directory
  1342.       prodDir$ = Lot_GetInstallDir()
  1343.       gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
  1344.    END IF
  1345.  
  1346.    'print gInstallIniFile$,"gInstallIniFile$"
  1347.  
  1348.       'Write the appropriate entries
  1349. FOR StrucCount% = 1 TO NumOfStrucs%
  1350.     'Make the keyWordListName
  1351.     KWList$ = "KeyWordList"+LTRIM$(STR(StrucCount%))
  1352.     'print KWList$, "KWList$"
  1353.  
  1354.     'Get the number of the keywords 
  1355.     KeyWordListLen% = GetListLength(KWList$)
  1356.     'print KeyWordListLen%,"KeyWordListLen%"
  1357.      
  1358.     'See if this feature was installed
  1359.     'This will be true if one or more sections are installed    
  1360.     InstalledFlag% = 0
  1361.     IF KeyWordListLen% <> 0 THEN
  1362.     FOR KeyWordCount% = 1 TO KeyWordListLen%
  1363.         KeyWordName$ = GetListItem(KWList$,KeyWordCount%)
  1364.         keyvalname1$ =    Shared32Data(StrucCount%).RegistrationKey
  1365.         keyvalname2$ =    Shared32Data(StrucCount%).Version 
  1366.         ' JMD: Only write the entry if registry info provided
  1367.         IF keyvalname1$ <> "" AND keyvalname2$ <> "" THEN
  1368.             ComponentNameAndVer$ = keyvalname1$ + "\" + keyvalname2$ 
  1369.             SELECT CASE network$
  1370.             CASE gSTANDARD$ 
  1371.                 IF (FIsKeywordinCopyList (KeyWordName$) = 1) THEN
  1372.                     'Write it in cinstall.ini for uninstall 
  1373.                     'print ComponentNameAndVer$,"ComponentNameAndVer$"
  1374.                     CreateIniKeyValue gInstallIniFile$,_
  1375.                                      "WIN32 Shared Component Information",_
  1376.                                      KeyWordName$, _
  1377.                                      ComponentNameAndVer$,_
  1378.                                      cmoOverwrite
  1379.                     InstalledFlag% = 1
  1380.                 END IF
  1381.                  
  1382.             CASE gNODE$ 
  1383.                 IF Lot_IsTheFeatureInstalled(KeyWordName$) = 1 THEN
  1384.                     'Write it in cinstnode.ini for uninstall 
  1385.                     'print ComponentNameAndVer$,"ComponentNameAndVer$"
  1386.                     CreateIniKeyValue gInstallIniFile$,_
  1387.                                      "WIN32 Shared Component Information",_
  1388.                                      KeyWordName$, _
  1389.                                      ComponentNameAndVer$,_
  1390.                                      cmoOverwrite
  1391.                     InstalledFlag% = 1
  1392.                 END IF
  1393.             END SELECT
  1394.         END IF
  1395.     NEXT
  1396.     END IF
  1397.  
  1398.      'Write the registry entries for this feature
  1399.      'only if installed and node or standard
  1400.     IF InstalledFlag% = 0 THEN GOTO DONEXTONE
  1401.     IF network$ <> gSTANDARD$ AND network$ <> gNODE$ THEN GOTO DONEXTONE
  1402.  
  1403.     'TV: not needed anymore!!
  1404.     '** TV: For Teammail  write win.ini for msmail file
  1405.     'IF Shared32Data(StrucCount%).Win32ComponentName = "TeamMail"  THEN 
  1406.     'Write entry to win.ini
  1407.     ' CreateIniKeyValue "win.ini", "Mail", "SMI", "1", cmoOverwrite
  1408.     'END IF 
  1409.     '*** end special case for teammail
  1410.  
  1411.     '**************************
  1412.     '** Registry Key Processing
  1413.     '**************************
  1414.     
  1415.     IF Shared32Data(StrucCount%).RegistrationKey <> "" THEN
  1416.         'WriteTheComponent Key and Version
  1417.         ComponentNameAndVer$ = Shared32Data(StrucCount%).RegistrationKey+"\"+Shared32Data(StrucCount%).Version 
  1418.         LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
  1419.               gREGLOTUSCOMP+"\"+ComponentNameAndVer$)
  1420.         'print " after calling Lot_RegCreateKeyEx in share32",LReturn&        
  1421.  
  1422.           '*** TV: Special processing for System Services
  1423.           '*** Used by Lotus Script and Chart    
  1424.           IF Shared32Data(StrucCount%).Win32ComponentName =    "Lotus Script" OR _
  1425.          Shared32Data(StrucCount%).Win32ComponentName =    "Chart" THEN
  1426.          LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
  1427.               gREGLOTUSCOMP+"\SystemServices\3.0")
  1428.  
  1429.           END IF
  1430.     
  1431.           '*** TV: Special processing for Chart
  1432.           LocCompPath$=Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
  1433.  
  1434.           '** should actually be WIN32SHRCHARTUSER
  1435.  
  1436.           IF Shared32Data(StrucCount%).Win32ComponentName =    "Chart"     THEN
  1437.         LReturn& = Lot_RegCreateKeyEx(HKEY_CURRENT_USER,_
  1438.               gREGLOTUSCOMP+"\"+ComponentNameAndVer$)
  1439.  
  1440.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_
  1441.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1442.                  "Style Directory", REG_SZ,_
  1443.                   LocCompPath$, LENBP(LocCompPath$)+1) '' HISHI - 10/5/95
  1444.         '*** Needed but should have been taken care of By the
  1445.         '** common check above for LotusScript and Chart
  1446.         'LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
  1447.         '      gREGLOTUSCOMP+"\SystemServices\3.0")
  1448.  
  1449.         file$ = "LTCHEN20.DLL"
  1450.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1451.                   gREGLOTUSCOMP+"\SystemServices\3.0", _
  1452.                  "INFO", REG_SZ,_
  1453.                   file$, LEN(file$)+1)
  1454.         file$ = "LTSIN30.DLL"
  1455.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1456.                   gREGLOTUSCOMP+"\SystemServices\3.0", _
  1457.                  "LSI", REG_SZ,_
  1458.                   file$, LEN(file$)+1)
  1459.           END IF
  1460.           '*** end special processing
  1461.     
  1462.           '*** TV: Special processing for Mobil Player
  1463.           IF Shared32Data(StrucCount%).Win32ComponentName =    "Mobil Player" THEN
  1464.           LocCompPath$=Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
  1465.  
  1466.         keyvalname1$ =    "Keep Metafile Size"
  1467.         keyval1& = 00000000
  1468.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1469.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1470.                   keyvalname1$, REG_DWORD,_
  1471.                   keyval1&, 4)
  1472.  
  1473.         keyvalname2$ =    "Dither Grad Fills in Metafiles"
  1474.         keyval2& = 00000001
  1475.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1476.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1477.                   keyvalname2$, REG_DWORD,_
  1478.                   keyval2&, 4)
  1479.         
  1480.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1481.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1482.                  "Working Directory", REG_SZ,_
  1483.                   LocCompPath$, LENBP(LocCompPath$)+1) '' HISHI - 10/5/95
  1484.           END IF
  1485.           '*** end special processing for Player
  1486.           
  1487.           '*** TV: Special processing for Spell Data, User
  1488.           IF Shared32Data(StrucCount%).Win32ComponentName =    "Spell Checker"     THEN
  1489.         '*** Spell Data Path
  1490.         IF network$ = gSTANDARD$ THEN
  1491.             CompPath$ = GetSymbolValue(SYM_COMPONENTSDIR$) + "spell"
  1492.         ELSE 
  1493.             '*** has to be node
  1494.             CompPath$ = GetSymbolValue(SYM_NETCOMPONENT$) + "spell"
  1495.         END IF
  1496.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1497.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1498.                  "Data Path", REG_SZ,_
  1499.                   CompPath$, LENBP(CompPath$)+1) '' HISHI - 10/5/95
  1500.  
  1501.         '*** Spell Multi User Path
  1502.         UserPath$ = GetSymbolValue(SYM_LOTUSUSERDIR$) + "spell"
  1503.         LReturn& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_
  1504.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
  1505.                  "Multi User Path", REG_SZ,_
  1506.                   UserPath$, LENBP(UserPath$)+1) '' HISHI - 10/5/95
  1507.         
  1508.           END IF
  1509.           '*** end special processing for Spell
  1510.  
  1511. %rem
  1512. =====> Don't do this since the products have to do it anyway for suite
  1513.         'Make the shared component entry for the product/version
  1514.         'only for single product install!
  1515.         IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ THEN _
  1516.             LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
  1517.                 gREGLOTUS+_
  1518.                 GetSymbolValue(SYM_REG_PRODUCTNAME$)+"\"+_
  1519.                 GetSymbolValue(SYM_REG_PRODUCTVER$)+"\"+_
  1520.                 "Components\"+_
  1521.                 ComponentNameAndVer$)
  1522.  
  1523. =====> Don't do this per Registry Stucture Guidelines
  1524.           'Write the name if KeyFileName 
  1525.         IF Shared32Data(StrucCount%).KeyFileName <> "" THEN
  1526.              'print " before calling Lot_CreateRegKeyValueEx in share32"        
  1527.              LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1528.                   gREGLOTUSCOMP+"\"+ComponentNameAndVer$,_
  1529.                   "Name",_
  1530.                   REG_SZ,_
  1531.                   """"+Shared32Data(StrucCount%).KeyFileName+"""", _
  1532.                   LENBP(Shared32Data(StrucCount%).KeyFileName)+2) ''** HISHI - Aug/23/95
  1533.              'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn&        
  1534.  
  1535.                IF LReturn& <> ERROR_SUCCESS THEN _
  1536.                RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP+"\"+ComponentNameAndVer$,"Name",""""+Shared32Data(StrucCount%).KeyFileName+""""
  1537.  
  1538.         END IF
  1539. %endrem
  1540.  
  1541.         'Write the help files into the Win95 Regisry
  1542.         '-------------------------------------------
  1543.         'ListName will be blank if no help files exist for feature
  1544.         ListName$ = Shared32Data(StrucCount%).HelpFileNames
  1545.         IF ListName$ = "" GOTO HELPDONE
  1546.  
  1547.         SELECT CASE network$
  1548.         CASE gSERVER$
  1549.                   GOTO HELPDONE
  1550.         CASE gDISTRIBUTION$
  1551.                   GOTO HELPDONE
  1552.         CASE gSTANDARD$ 
  1553.         ' Get the destination directory corresponding to the keyword 
  1554.         ' by finding it from first installed section
  1555.             KWList$ = "KeyWordList"+LTRIM$(STR(StrucCount%))
  1556.             KeyWordListLen% = GetListLength(KWList$)
  1557.             FOR KeyWordCount% = 1 TO KeyWordListLen%
  1558.                 KeyWordName$ = GetListItem(KWList$,KeyWordCount%)
  1559.                 s$ =  Lot_GetChapterFromKeyword(KeyWordName$)
  1560.                 IF s$ <> "" THEN s$ = Lot_GetChapterValStr(s$, F_DESTDIRSYM)
  1561.                 IF s$ <> "" THEN s$ = GetSymbolValue(s$)
  1562.                 if s$ <> "" THEN EXIT FOR
  1563.             NEXT    
  1564.         CASE gNODE$ 
  1565.         ' Register the help registry entry under the first product
  1566.             KeyWordName$ = Reg_GetProductAcronym(1) + gTOP$
  1567.         ' For node, assume all help files are in the NETCOMPONENT on the server
  1568.             s$ = GetSymbolValue(SYM_NETCOMPONENT$)
  1569.         END SELECT
  1570.         if s$ = "" THEN GOTO HELPDONE
  1571.  
  1572.         'Add subdirectory under main compnent directory, if any
  1573.         IF Shared32Data(StrucCount%).DestSubdir <> "" THEN _
  1574.             s$ = MakePath(s$, Shared32Data(StrucCount%).DestSubdir)
  1575.         IF RIGHT$(s$, 1) <> "\" THEN  s$ = s$+ "\"
  1576.         ' Traverse the list of help files looking for installed ones
  1577.         IF s$ <> ""    THEN
  1578.             ListLength% = GetListLength(ListName$)
  1579.             FOR Count% = 1 TO ListLength%
  1580.                 FileName$ = GetListItem(ListName$, Count%)
  1581.                 IF DoesFileExist(s$+FileName$,femExists) = 1 THEN _
  1582.                     Lot_RegisterHelpFile KeyWordName$, s$, FileName$
  1583.             NEXT
  1584.         END IF
  1585. HELPDONE:
  1586.  
  1587.         'Writes the Dependents if they exists
  1588.         'but not for node install, since no shared components are on node
  1589.     IF network$ <> gNODE$ THEN
  1590.         'make the DependsOnNameList name 
  1591.         DependsOnNameList$ = "DependsOnNameList"+LTRIM$(STR(StrucCount%))
  1592.         'make the DependsOnVerList name 
  1593.         DependsOnVerList$ = "DependsOnVerList"+LTRIM$(STR(StrucCount%))
  1594.         DependsOnListLen% = 0
  1595.         DependsOnListLen% = GetListLength(DependsOnNameList$)
  1596.         lenVer% =GetListLength(DependsOnVerList$)
  1597.         IF lenVer% = DependsOnListLen%  AND DependsOnListLen% <> 0 AND _
  1598.           GetListItem(DependsOnNameList$,1) <> "" THEN
  1599.             FOR DependsOnCount% = 1 TO DependsOnListLen%
  1600.                 ver$ = GetListItem(DependsOnVerList$,DependsOnCount%)
  1601.                 LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
  1602.                                 gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%))
  1603.                  'print " before calling Lot_CreateRegKeyValueEx in share32"        
  1604.                 LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
  1605.                       gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%),_
  1606.                       "Version",_
  1607.                       REG_SZ,_
  1608.                       ver$, _
  1609.                       LEN(ver$)+1)
  1610.                  IF LReturn& <> ERROR_SUCCESS THEN
  1611.                     RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%),"Version",ver$
  1612.                  END IF
  1613.                 'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn&        
  1614.             NEXT
  1615.         END IF
  1616.     END IF
  1617.  
  1618.     END IF        ' Registry processing           
  1619.            
  1620.     '**********************
  1621.     '** INI File Processing
  1622.     '**********************
  1623.            'If there is an Ini entry write it
  1624.            IF Shared32Data(StrucCount%).IniFileName <> "" AND _
  1625.           Shared32Data(StrucCount%).IniSectionName <> "" AND _
  1626.           Shared32Data(StrucCount%).IniEntryName <> ""  THEN
  1627.           IF Shared32Data(StrucCount%).DestSubdir <> "" THEN
  1628.              path$ = GetSymbolValue(SYM_COMPONENTSDIR)+Shared32Data(StrucCount%).DestSubdir
  1629.           ELSE
  1630.              'print GetSymbolValue(SYM_COMPONENTSDIR$)
  1631.              path$ = Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
  1632.           END IF
  1633.           IF Shared32Data(StrucCount%).IniEntryName <> "Common Directory"  AND _
  1634.              Shared32Data(StrucCount%).IniEntryName <> "" AND _
  1635.              Shared32Data(StrucCount%).IniSectionName <> ""   AND _
  1636.              Shared32Data(StrucCount%).IniFileName <> ""   THEN
  1637.              CreateIniKeyValue MakePath( GetWindowsDir(), Shared32Data(StrucCount%).IniFileName), _
  1638.                     Shared32Data(StrucCount%).IniSectionName, _
  1639.                     Shared32Data(StrucCount%).IniEntryName, _
  1640.                     path$, cmoOverwrite
  1641.           ELSE
  1642.              IF GetSymbolValue(SYM_LOTUSAPPDIR$) <> "" AND _
  1643.             network$ = gSTANDARD$ THEN
  1644.                CreateIniKeyValue gLotusIniPath$, _
  1645.                     "Lotus Applications", _
  1646.                     "Common Directory", _
  1647.                     GetSymbolValue(SYM_LOTUSAPPDIR$), cmoOverwrite
  1648.             
  1649.              ELSE
  1650.             IF GetSymbolValue(SYM_NETLOTUSAPP$) <> "" AND _
  1651.                network$ = gNODE$ THEN
  1652.                CreateIniKeyValue gLotusIniPath$, _
  1653.                     "Lotus Applications", _
  1654.                     "Net Common Directory", _
  1655.                     GetSymbolValue(SYM_NETLOTUSAPP$), cmoOverwrite
  1656.  
  1657.             END IF
  1658.              END IF
  1659.           END IF
  1660.            END IF ' end of writing the ini entry
  1661.  
  1662.  
  1663. DONEXTONE:
  1664. NEXT        ' NumOfStrucs
  1665.  
  1666. END SUB
  1667.  
  1668. SUB PopupMappingErrorMsgExit(szPath$)
  1669. '** Purpose:   If components directory drive not mapped or unc path invalid,
  1670. '** popup a dialog and exit
  1671. '**                 
  1672. '** Author:    JMD
  1673. '** Arguments: szPath$    Path 
  1674. '*************************************************************************
  1675.     DIM sz$, i%
  1676.     sz$ = LdString(SID_ERR_DRIVENOTMAPPED)
  1677.     i% = INSTR(sz$, "%")
  1678.     sz$ = MID(sz$, 1, i%-1) + szPath$ + MID(sz$, i%+2, LEN(sz$))
  1679.     i% = DoMsgBox (sz$, LdString(SID_TKT_STD_TITLE) , MB_OK)
  1680.     gEndStatementEncountered% = TRUE
  1681. END SUB
  1682.  
  1683. CONST DRIVE_UNKNOWN     = 0
  1684. CONST DRIVE_NO_ROOT_DIR = 1
  1685. CONST DRIVE_REMOVABLE   = 2
  1686. CONST DRIVE_FIXED       = 3
  1687. CONST DRIVE_REMOTE      = 4
  1688. CONST DRIVE_CDROM       = 5
  1689. CONST DRIVE_RAMDISK     = 6
  1690.  
  1691.  
  1692. PUBLIC FUNCTION IsDriveMapped(szPath$) AS INTEGER
  1693. '** Purpose:    Determine if a drive letter for shared component is currently
  1694. '** mapped or if UNC volume if the directory exists
  1695. '** Author:     JMD
  1696. '** Arguments:  Drive$        Drive letter to test
  1697. '** Returns:    TRUE if mapped
  1698. '*************************************************************************
  1699.     DIM sz$, lDrive$, i%, length%, drivetype%, uncOff&
  1700.  
  1701.     IsDriveMapped = FALSE
  1702.     IF szPath$="" THEN EXIT FUNCTION
  1703.     uncOff& = INSTR(1, szPath$, "\\")
  1704.     ' UNC Volume, check if directory exists
  1705.     IF uncOff > 0 THEN
  1706.         IF DoesDirExist(szPath$) = 1  THEN IsDriveMapped = TRUE
  1707.         EXIT FUNCTION
  1708.     END IF
  1709.     sz$ = LCASE(Lot_ExtractDriveLetter(szPath$)) 
  1710.     GetValidDrivesList("Drives")
  1711.     length% = GetListLength("Drives")
  1712.     FOR i% = 1 TO length%
  1713.         lDrive$ = GetListItem("Drives", i%)
  1714.         'See if it's really there
  1715.         IF LCASE(lDrive$) = sz$ THEN
  1716.             drivetype% = GetDriveType(LEFT(lDrive$,1)+ ":\")
  1717.             IF drivetype% = DRIVE_FIXED THEN IsDriveMapped = TRUE
  1718.             IF drivetype% = DRIVE_REMOTE THEN IsDriveMapped = TRUE
  1719.         END IF
  1720.     NEXT
  1721.     RemoveSymbol "Drives"
  1722. END FUNCTION
  1723.  
  1724. PUBLIC SUB Lot_RegisterHelpFile(szKey$, szDir$, FileName$)
  1725. '** Purpose:    Register help file in Windows registry and record it as an 
  1726. '**                 object in cinstall.ini for uninstall
  1727. '** Author:       JMD
  1728. '** Arguments:    szKey$        Section keyword
  1729. '**                 szDir$        Path to help file
  1730. '**                 FileName$   Help file name
  1731. '*************************************************************************
  1732.  
  1733.     DIM Size%
  1734.     Size% = lenbp(szDir$) + 1 '' HISHI - 10/5/95
  1735.     Lot_CreateRegKeyValueEx HKEY_LOCAL_MACHINE, gREGWINDOWSHELP, FileName$, _
  1736.         REG_SZ, szDir$, Size%
  1737.     Lot_RegisterObject szKey$, UNIN_CLASS_REGISTRY_VALUE$,_
  1738.         gHLM$ + "\" + gREGWINDOWSHELP + "\" + FileName$
  1739.  
  1740. END SUB
  1741.  
  1742. PUBLIC FUNCTION Lot_RefreshLocalComponentDir () AS INTEGER
  1743. '** Purpose:    Traverses the list of shared 32 bit component sections and if 
  1744. '**                 any are copied to the node it resets the source directory to the
  1745. '**                corresponding value in the "cinstall.ini" file
  1746. '** Author:     JMD
  1747. '** Arguments:  None
  1748. '** Returns:    SUCCESS
  1749. '*************************************************************************
  1750.     DIM Network$, ServerComponentPath$, KeyWordName$
  1751.     DIM ServerUserPath$, Source$, Dest$, Chapter$, ChapterSpec$, s$
  1752.  
  1753.     'Function only valid for node installs
  1754.    Network$ = GetSymbolValue(SYM_NETWORK$)
  1755.    IF Network$ <> gNODE$ THEN EXIT FUNCTION
  1756.     'Read the server locations corresponding to these special symbols
  1757.     ServerComponentPath$ = Lot_GetDestDirValueFromInstallini(SYM_COMPONENTSDIR$)
  1758.     ServerUserPath$ = Lot_GetDestDirValueFromInstallini(SYM_LOTUSUSERDIR$)
  1759.     'Traverse the copy list for shared sections
  1760.     Chapter$ = Lot_GetFirst("", F_SHARE) 
  1761.     WHILE (Chapter$ <> "")
  1762.         KeyWordName$ = Lot_GetChapterValStr(Chapter$, F_KEYWORD)
  1763.         IF Lot_IsTheFeatureInstalled(KeyWordName$) = 1 THEN
  1764.             s$ = Lot_GetChapterValStr(Chapter$, F_DESTDIRSYM)
  1765.             'Find out if it is a user or component section
  1766.             IF (s$ = SYM_LOTUSUSERDIR$) THEN
  1767.                 Source$ = ServerUserPath$ 
  1768.                 Dest$ = GetSymbolValue(s$)
  1769.             ELSEIF (s$ = SYM_COMPONENTSDIR$) THEN    
  1770.                 Source$ = ServerComponentPath$ 
  1771.                 Dest$ = GetSymbolValue(s$)
  1772.             ELSE    
  1773.                 'Could be WIN, WINSYS, don't reset
  1774.                 GOTO NEXTONE
  1775.             END IF
  1776.             ChapterSpec$ = Lot_GetChapterValStr(Chapter$, F_NOTHING)
  1777.             AddSectionFilesToCopyList ChapterSpec$,Source$,Dest$
  1778.         END IF
  1779. NEXTONE:
  1780.       Chapter$ = Lot_GetNext() 
  1781.     WEND
  1782.    Lot_RefreshLocalComponentDir = SUCCESS
  1783. END FUNCTION
  1784.